import { get, post, put, deletefn } from "@/utils/apiConfigs.js"

//添加角色
export const getAddRoles = (params) => post('/roles', params)

//编辑角色
export const getEnditRoles = (id, params) => put('/roles/' + id, params)

//删除角色
export const getRemoveDel = (id) => deletefn(`roles/${id}`)

//角色列表数据
export const getRolesData = () => get("/roles")

//角色授权中的数据
export const getRolesTreeData = () => get("/rights/tree")

//角色授权设置
export const getRolesEnd = (id, params) => post(`roles/${id}/rights`, params)

//删除授权权限
export const getRemoveTree = (id1, id2) => deletefn(`roles/${id1}/rights/${id2}`)
